package framework.ai;

public class FieldValue {
	
	private int owner;
	
	private int wins;
	private int losses;
	private int draws;
	
	public FieldValue(){
		this(0);
	}
	
	public FieldValue(int owner){
		this.wins = 0;
		this.losses = 0;
		this.draws = 0;
		this.owner = owner;
	}
	
	public int getWins(){
		return this.wins;
	}
	
	public int getLosses(){
		return this.losses;
	}
	
	public int getDraws(){
		return this.losses;
	}
	
	public void addWins(int wins){
		this.wins+= wins;
	}
	
	public void addLosses(int losses){
		this.losses+= losses;
	}
	
	public void addDraws(int draws){
		this.draws+= draws;
	}
	
	public double getWinPercentage(){
		return this.wins*100 /(this.wins+this.losses+this.draws);
	}
}
